package com.ihr360.payroll.entity.task;

import com.ihr360.common.NumberId;
import com.ihr360.commons.model.type.AccessPrivilege;
import com.ihr360.payroll.type.PeriodState;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Builder;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 账期
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PayPeriodEntity extends NumberId<Long> implements Serializable {

    private static final long serialVersionUID = -2474362861872124210L;
    /**
     * 账期起始日
     */
    private Date startOn;
    /**
     * 账期结束日
     */
    private Date endOn;

    /**
     * 考勤起始日
     */
    private Date attendanceStartOn;
    /**
     * 考勤结束日
     */
    private Date attendanceEndOn;

    /**
     * 批次信息
     */
    private List<PayPeriodTermEntity> terms;

    private Long currentTermId;

    /**
     * 当前批次中的执行id记录
     */
    private List<Long> currentTermJobExcutionIds;
    /**
     * 账期状态
     */
    private PeriodState state;

    /**
     * 账期中包含的计算人数
     */
    private int count;

    private Long planId;

    private String planName;

    private AccessPrivilege planPrivilege;

    private boolean planMonthCycle;

    private boolean needCopyCanStart;

    private String applicationId;

    private int year;

    private int month;

}